home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / inter52e.zip / 86BUGS04.ZIP / IAPX122.ZIP / IAPX.DOC < prev    next >
Text File  |  1994-10-11  |  22KB  |  535 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.         ⌠ iAPX; Show CPU/NPX Profile and test 'em
  11.         ⌡ Copyright 1986-94 by Chris Lueders
  12.  
  13.         Version 1.22
  14.  
  15.         For noncommercial use and distribution
  16.  
  17.  
  18.  
  19.  
  20.         See file LICENSE.DOC for license info
  21.  
  22.  
  23.  
  24.  
  25.  
  26.         This doc file and related material (at least the IAPX.COM file)
  27.         was written by Chris Lueders. Feel free to contact me whenever you
  28.         like to. Try one of the following ways:
  29.  
  30.              via FidoNet : Chris Lueders @ 2:2453/30
  31.             via Internet : chris@rhein.de
  32.          via Support BBS : Zaphods BBS, +49-228-262894 V32b/HST
  33.                                         +49-228-9111041 ISDN X75
  34.  
  35.  
  36.  
  37.         Please call me if you have problems with special items or special
  38.         boards you used for running this software. Please call me if you
  39.         have further suggestions for future versions, too.
  40.  
  41.  
  42.  
  43.                                *** WARRANTY ***
  44.  
  45.         Absolutely none.
  46.  
  47.         THE AUTHOR AND HIS ACCOCCIATES SHALL NOT BE HELD RESPONSIBLE FOR
  48.         ANY DAMAGES, LIABILITY, OR LOSS OF REVENUE DUE  TO  THE  USE  OR
  49.         INABILITY TO USE THIS PROGRAM. THIS INCLUDES, BUT IS NOT LIMITED
  50.         TO,  ANY  INTERRUPTION  OF  SERVICE,   LOSS   OF   BUSINESS   OR
  51.         ANTICIPATORY PROFITS, OR CONSEQUENTIAL DAMAGE RESULTING FROM THE
  52.         USE OF THIS PROGRAM. IN AREAS  WERE  SUCH  LIMITATIONS  ARE  NOT
  53.         LEGAL THIS PROGRAM IS NOT LICENSED FOR USE.
  54.  
  55.  
  56.  
  57.                                *** DISCLAIMER ***
  58.  
  59.         This program is a processor testing tool. Therefore it messes
  60.         around with the CPU as it likes. PLEASE BE AWARE THAT THIS CAN
  61.         TRASH YOUR SYSTEM. To prevent loss of data, ENSURE DISK CACHES TO
  62.         BE WRITTEN TO DISK PRIOR TO START THIS PROGRAM!
  63.  
  64.         We tried to take any precaution, but we can take NO WARRANTY that
  65.         this tool will run correctly and won't crash your machine. Herewith
  66.         you have been warned ...
  67.  
  68.  
  69.  
  70. ======  1 - What's that small program for?  Do I need it?  ===================
  71.  
  72.         OF COURSE !
  73.         You may think "What program may this be with it's dox four times as
  74.         big as the executable?". I'll try to tell you.
  75.  
  76.         iAPX is a program designed for showing you some data and internals
  77.         of your computer. You may use it in case you buy or sell a computer
  78.         to check the CPU and/or NPX for type, clock ratings and known bugs.
  79.  
  80.         The "normal" use may be one of the following:
  81.  
  82.         1. You meet a friend, who has a new machine, but doesn't know
  83.            anything about it. You like to get some infos, but forgot
  84.            your computer hardware technician service kit. So, just run this
  85.            small program instead of working on the hardware. Some folks
  86.            won't let you open their computer, so this method is much more
  87.            "user friendly"
  88.  
  89.            It's not only faster; it's even more neat and will discover some
  90.            results that you can't get staring at the hardware yourself.
  91.  
  92.         2. You want to buy a new computer (or only a board). You neither
  93.            trust the company that sells the boards, nor the chips themselves.
  94.            As you intend to run Novell Netware 386 on this machine, you want
  95.            to know if this CPU has some of the known errors even Netware
  96.            checks for. Solution: simply start iAPX and it'll test the CPU
  97.            for all known (at least to me) bugs. If all is correct, you may
  98.            (more) safely purchase this board. If not, I highly recommend not
  99.            to buy this board.
  100.  
  101.  
  102.         iAPX has 3 commandline switches (say: "Wow!"):
  103.  
  104.         ⌠  iAPX; Show CPU/NPX Profile and test 'em; MS-DOS Vsn for IBM/PC
  105.         ⌡  V1.22, chris@rhein.de 86-94; S/N 941011:1135; DOS 2.00; ...
  106.  
  107.            Commandline syntax :
  108.               iAPX [?][p][r]
  109.  
  110.            ? - This screen
  111.            P - Pause after each page of screen output
  112.            R - Reset to get CPU ID/Rev; use with caution! This option is
  113.                somewhat nasty; ENSURE DISK CACHES TO BE WRITTEN TO DISK !!
  114.  
  115.            Thanx to Bob Smith from Qualitas, Inc.  I got some help from ...
  116.  
  117.            Refer to the documentation for more information.
  118.  
  119.         This is the output of the "?" switch. The "P" switch will pause the
  120.         output before it scrolls off your screen. The "R" switch enables CPU
  121.         RESET to kick the ID/Rev value out of it ... See later chapters in
  122.         this doc on this topic.
  123.  
  124.  
  125.         A typical call of iAPX looks like this (done on one of my machines
  126.         with the "R" option enabled):
  127.  
  128.         ⌠  iAPX; Show CPU/NPX Profile and test 'em; MS-DOS Vsn for IBM/PC
  129.         ⌡  V1.22, chris@rhein.de 86-94; S/N 941011:1135; DOS 2.00; ...
  130.  
  131.         -   Main Processor : Intel 386 DX
  132.               Clock rate 1 : 40.1 MHz
  133.               Clock rate 2 : 40.4 MHz
  134.  
  135.         -   Check CPU bugs :
  136.                       POPA : FAILED
  137.  
  138.         -   Int_Desc_Table : Limit=03ff, Base=00000000
  139.            Glob_Desc_Table : Limit=0010, Base=000de828
  140.                      Flags : PE MP EM IOPL  ET
  141.                               0  0  0    3   1
  142.  
  143.         -  Number Cruncher : none
  144.  
  145.         -  BIOS CPU ID/Rev : not supported
  146.  
  147.               Reset ID/Rev : 0308
  148.                    that is : 386 DX, Step D1
  149.  
  150.  
  151.         See the next section for details on every single line.
  152.         (I'd like to mention, that this machine is the only type of 386 based
  153.         computer i've ever met, that had NO bug. ;-))
  154.  
  155.  
  156.  
  157. ======  2 - What do these lines of output suggest to me?  ====================
  158.  
  159.  
  160.         Ok, we'll look at each line seperately and i'll try to explain the
  161.         contents and meaning of each of them.
  162.  
  163.  
  164.  
  165. ------  2.1 - Main Processor  ------------------------------------------------
  166.  
  167.         Guess what - this is the type of CPU you use. iAPX has the ability
  168.         to check for the following types:
  169.  
  170.                 - Intel 8088                - Intel 80286
  171.                 - Intel 8086                - Intel 80386 SX
  172.                 - NEC V20                   - Intel 80386 DX
  173.                 - NEC V30                   - Intel 80486 SX
  174.                 - Intel 80188               - Intel 80486 DX
  175.                 - Intel 80186
  176.  
  177.         The measurements of clock rating, the selection of appropriate
  178.         CPU tests, and the display of CPU infos is based on this type
  179.         check. If there were an error in these routines it would
  180.         likely mess up all other parts of the output (and possibly your
  181.         whole system as well).
  182.  
  183.         Note, that iAPX cannot determine if you're using a 486 DX or a
  184.         486 SX with 487 SX attached. This is because the 487 SX is a full
  185.         486 DX, and the 486 SX is disabled if a 487 SX is active and
  186.         running. (You can plug it out (at your own risk, buddy) and the
  187.         system is still running !!). If iAPX mentions you were using an
  188.         486 SX, the NPX failed responding.
  189.  
  190.  
  191.  
  192. ------  2.2 - Clock ratings  -------------------------------------------------
  193.  
  194.         iAPX tries to measure the rating of the clock that drives
  195.         your CPU and/or NPX. This is, unfortunately, not an easy task, so
  196.         I decided to implement two indepentent tests to check for this
  197.         value. Don't be worried about *two* rates; they both describe the
  198.         same clock.
  199.  
  200.         I personally think that test no. 1 is the better method of
  201.         measurement, and I intend to remove the second test in future
  202.         versions. If you discover big differences between these two values,
  203.         please let me know; and please tell me further, what type of CPU you
  204.         are running and what environment was active while testing (QEMM, DV,
  205.         Windows (what mode?), OS/2 (version? mode?), &c).
  206.  
  207.         The measurement of the clocks is VERY nasty if you use one of the
  208.         newer clone CPUs by AMD, C&T or something like that, because these
  209.         CPUs look like an Intel, work like an Intel, but they're faster. So
  210.         *IF* you're using such an CPU i'd appreciate an output of iAPX to
  211.         get the timings of these newer releases.
  212.  
  213.  
  214.  
  215. ------  2.3 - Test CPU for known bugs  ---------------------------------------
  216.  
  217.         There are several known bugs in the Intel CPU's running in the
  218.         computers of the world (and even in the clones such as them coming
  219.         from AMD). I thought it could be very interesting (e.g. if you buy
  220.         a board or a whole machine, see above) if the processor is one
  221.         of the many buggy versions still for sale today. For example, three
  222.         of four tested 386 machines in my office had the POPA bug. Hopefully
  223.         the most compilers will generate "CPU bug tolerant" code, but if
  224.         not.. it might hang!
  225.  
  226.         The errors I try to diagnose mostly relate to a special CPU type
  227.         (e.g. 80386), but I'm testing every CPU for proper operation if the
  228.         intruction set gives me the possibility to do so.
  229.  
  230.  
  231.         2.3.1 - IDIV [mem]
  232.  
  233.         This was a bug in an early version of the 80186. The processor faulted,
  234.         if you tried to IDIV with a negative divisor in memory (and not in
  235.         a register).
  236.         So far, I never discovered a CPU that messed up with this test (I
  237.         must admit I never met a 80186 in person :-).
  238.  
  239.  
  240.         2.3.2 - REP [instr]
  241.  
  242.         This was also a bug in one of the early versions of the 80186 pro-
  243.         cessor. If the CPU got a HOLD signal while working in a REP [instr]
  244.         cycle, it served the HOLD and afterwards "forgot" to take up it's work
  245.         with the REP again. Never found a faulty CPU till now.
  246.  
  247.  
  248.         2.3.3 - POPA
  249.  
  250.         Very common bug in 386 machines. I've tested that on 12 machines,
  251.         10 of which were faulty! It seems this bug has been fixed only in
  252.         recentl 386SX versions (all 386DX i got sofar are bad; even AMD
  253.         chips).
  254.  
  255.         Symptoms: Sometimes the processor messes up the AX register
  256.         after a POPA instruction, which depends on the next opcode you give
  257.         it to eat. To fix any problems with this instruction, simply put a
  258.         NOP instruction after the POPA. After that it'll work out fine.
  259.  
  260.         If you try this one on a buggy CPU, it will mess up your AX register:
  261.  
  262.            mov     ax,1234h
  263.            mov     bx,0
  264.            mov     di,0
  265.            pusha
  266.            popa
  267.            mov     cx,[bx+di]
  268.  
  269.         That's by no means an odd or unusual sequence of instructions. What's
  270.         more, the 'mov cx, ...' operation is done correctly. It's the 'popa'
  271.         which fails. See IAPX.DAT for the original data i based my tests on.
  272.         It seems to me, that not only 32-bit but also 16-bit operations will
  273.         cause this problem. iAPX only checks for this bug using the 16-Bit
  274.         version to be also able to test 186/286 CPUs.
  275.  
  276.  
  277.         2.3.4 - 16-Bit MUL and 32-Bit MUL
  278.  
  279.         Less common error, but may encounter. This was a bug in the early
  280.         versions of the 386 DX processor. I never got one of these buggy
  281.         units, but even Novell does this kindo check and won't operate if
  282.         it's discovered. See IAPX.DAT for further information.
  283.  
  284.  
  285.         2.3.5 - 32 Bit STOSB
  286.  
  287.         I heard that the 32bit STOSB instruction has some problems sometimes.
  288.         It may not correctly increment the high word of the EDI register.
  289.         Until now i didn't find a faulty CPU.
  290.  
  291.  
  292.         2.3.6 - BSWAP
  293.  
  294.         In one of the german computer magazines it was rumoured that the
  295.         BSWAP instruction on 486 does not work correctly and only would swap
  296.         one half down but forget to swap the other half down. So we check
  297.         this as well.
  298.  
  299.  
  300.         2.3.7 - CMPXCHG
  301.  
  302.         I read about the CMPXCHG instruction yielding an INT 6 (invalid
  303.         opcode) on some CPU's.
  304.  
  305.  
  306.  
  307. ------  2.4 - Further information on some CPU registers  ---------------------
  308.  
  309.         It may be interesting for you (e.g. if you intend to write some nasty
  310.         .ASM programs like this one), where some system tables are hidden and
  311.         how the setting of the CPU flags is. This output shows them:
  312.  
  313.                Int_Desc_Table : Limit=07ff, Base=00115c48
  314.  
  315.         This is the adress and length of the Interrupt-Descriptor-Table. Most
  316.         users think it's located at 0:0 even if they use QEMM or something
  317.         similar, but that's wrong.
  318.  
  319.               Glob_Desc_Table : Limit=028f, Base=00116448
  320.  
  321.         Address and Length of the Global-Descriptor-Table.
  322.  
  323.                      Flags : PE MP EM IOPL  ET
  324.                               0  0  0    3   1
  325.  
  326.         Some of the "static" system flags. It may be useful to take a look
  327.         at these if you have problems with some sort of programs, e.g. NPX
  328.         sensitive software.
  329.  
  330.         - PE bit: Protect Enable. If set, the processor is in protected mode.
  331.                   Though DOS doesn't run in 80286 protected mode, this
  332.                   means a supervisor task (such as QEMM, 386max) has
  333.                   switched the CPU (386 or above) to the V86 (virtual 8086)
  334.                   mode. This mode can emulate various 8086 lookalike tasks
  335.                   at the same time. Normally, only one task is active and
  336.                   this task is DOS. But the V86 mode lets the supervisor
  337.                   task shadow RAM, swap memory and so on.
  338.  
  339.         - MP bit: Monitor coProcessor. If set (and TS=1) an exception will
  340.                   be generated if the CPU encounters a WAIT instruction.
  341.  
  342.         - EM bit: EMulate coprocessor. If set an exception will be generated
  343.                   each time a coprocessor instruction is going to be executed.
  344.                   With aid of this bit, you can enable a floating point emu-
  345.                   lation. If EM=1, no coprocessor timings will be performed.
  346.  
  347.         - ET bit: Extension Type. In former versions of this documentation
  348.                   i mentioned not to know about this bit. Now i got the
  349.                   correct meaning. If set to 0, it means the attached NPX
  350.                   is 16-bit, if set to 1 it's 32-bit. It is (was) used to be
  351.                   able to run 80287 NPX on a 80386 CPU.
  352.  
  353.         - IOPL:   I/O Privilege Level. Used to control the use of special
  354.                   instructions, memory areas and other protection scemes.
  355.                   Will be 3 under most circumstances, even when PE=0.
  356.  
  357.  
  358.  
  359. ------  2.5 - Numerix Processor  ---------------------------------------------
  360.  
  361.         This will show you the type of coprocessor the CPU has attached (if
  362.         any). Note: it's not that easy you might think. You can, for example,
  363.         use an 80287 together with an 80386, so it may be interesting if
  364.         there is the "right" coprocessor active.
  365.  
  366.         The clock rating of the coprocessor may be interesting too. You can
  367.         obtain a "fast socket" for your 80287 running on an 80286. This will
  368.         alter the clock rating of the NPX while retaining the clock rating of
  369.         the main processor.
  370.  
  371.         iAPX also detects NPX software emulations but does not check, if the
  372.         emulator tries to be 387 compatible or not.
  373.  
  374.  
  375.  
  376. ------  2.6 - Computing the CPU ID and revision  -----------------------------
  377.  
  378.         At RESET the DX register of the 386 SX/DX or above will hold a value
  379.         indicating the type of processor and it's revision. It is not easy
  380.         to get this data. As described above, you have to issue a RESET to
  381.         get this info. Unfortunately, RESET is the hardest hit you can do to
  382.         a CPU. So please be alarmed NOT TO MESS AROUND with this option.
  383.  
  384.         I have taken some precautions to prevent system hangs or data
  385.         corruption. This includes flushing the chache buffers of e.g.
  386.         HyperDisk 4.50 and above. I, myself, never had problems with this
  387.         option, but i was told of crashes with e.g. the Intel Inboard.
  388.  
  389.         To prevent you and your system from spurious hangs, this test will
  390.         only be executed if the option "R" (=RESET) is stated at the command
  391.         line. The output looks like this:
  392.  
  393.                 -     Reset ID/Rev : 2308
  394.                            that is : 386 SX, Step C
  395.  
  396.         I added all decodings I could find for the ID/Rev word and
  397.         implemented them, but maybe you'll get unknown values. The revisions
  398.         and steps in Intel processor design usually increase with time.
  399.         Therefore, higher Revisions (lower byte of DX) indicate newer
  400.         releases.
  401.  
  402.         The known IDs are:
  403.  
  404.                 03 - 386 DX
  405.                 23 - 386 SX
  406.                 43 - 386 SL
  407.                 04 - 486 DX/SX
  408.  
  409.         AS far as I know, at least all 386 SX before the step C and all
  410.         386 DX before step D1 are faulty. If you intend to buy a computer,
  411.         I suggest not to buy a machine with this CPU revisions.
  412.  
  413.  
  414.  
  415. ======  3 - Program messages  ================================================
  416.  
  417.         "!!! Incorrect DOS version."
  418.            The DOS version is lower than 2.00. This is at least required to
  419.            run iAPX.
  420.  
  421.         "!!! System malfunction."
  422.            Indicates something unusual went wrong, such as unseccessful
  423.            memory allocation.
  424.  
  425.         " ?  WARNING : DesqView detected; ratings are most likely incorrect."
  426.         " ?  WARNING : Windows 3 in 386 enhanced mode detected; ..."
  427.            If DesqView or Windows 3 in enhanced mode is active, the timings
  428.            are very incorrect. Kick the multitasker out of your memory and
  429.            start the program again to get exact results.
  430.  
  431.  
  432.         "Stand by ..."
  433.            System timings and measurements are performed. Should only last
  434.            about 0.2 seconds. If it hangs, please let me know. Tell me *ALL*
  435.            about your system (type, speed, software, OS ...)
  436.  
  437.  
  438.         " ?  WARNING : 8253 not responding correctly or
  439.                        interrupt failure; no timings performed."
  440.            The test on the presence of the 8253 timer chip and the timer tick
  441.            interrupt failed. Should not occur on proper boards. Check your
  442.            setup and hardware.
  443.  
  444.  
  445.         "Timer Interrupt in loop ?"
  446.            While in a timing loop, an interrupt occured. This will abort
  447.            iAPX immediately. Try to reboot your system as soon as possible
  448.            to ensure stable operation.
  449.  
  450.  
  451.         "Press key to continue ..."
  452.            You're prompted to press any key you like to start screen
  453.            scrolling again. After that, the message will disappear.
  454.  
  455.  
  456.         "Overflow"
  457.            An register overflow was detected. Suggests a fault in this
  458.            program. Please inform the author about this and include the
  459.            register dump iAPX produces in such occasions and the version
  460.            of iAPX.
  461.  
  462.  
  463.         " ?  WARNING : CPU is in protected mode; cannot reset."
  464.            This indicates that the CPU may not be tested at this time,
  465.            because a supervisor task has full control over the CPU. Remove
  466.            supervisory software (QEMM386, 386MAX, etc.), reboot and try
  467.            again.
  468.  
  469.  
  470.         "Reset ..."
  471.            If you're able to read this message, your mashine is already dead.
  472.            It will be cleared immedeately after the RESET operation has
  473.            succeeded.
  474.  
  475.  
  476.         " ?  WARNING : A20 gate activation failed; cannot reset."
  477.            To issue a RESET to get the CPU ID/Rev the A20 gate must be active
  478.            (that is, memory above 1Mb must be adressable). The attempt to
  479.            active this gate failed.
  480.  
  481.  
  482.         " ?  WARNING : A20 reinitialization failure; REBOOT ASAP!"
  483.            After RESET iAPX was unable to reset the A20 gate to the old
  484.            setting. THIS MAY BE VERY DANGEROUS! Reboot your machine as soon
  485.            as possible!
  486.  
  487.  
  488.  
  489. ======  4 - Technical notes  =================================================
  490.  
  491.         iAPX was (you guessed it) written in Assembler, compiled with Micro-
  492.         soft's MASM 5.10, linked with MS-LINK 5.10 and edited with M 1.00.
  493.         Debugging was performed with NU-MEGA's Soft-ICE 2.50, CodeView and
  494.         AFD-Pro. By now it consists of 3000 lines handmade assembler code
  495.         (and is only about 6kb big after assembly! Try this with Windows SDK!)
  496.  
  497.         WARNING! The program may fault on machines that are not 100% IBM-
  498.         compatible. Very important are the ports for the 8259 (interrupt-
  499.         controller) and 8253 (timer-chip).
  500.  
  501.  
  502.  
  503. ======  5 - Epilogue  ========================================================
  504.  
  505.         Thanx a lot to the following people for their assistance, wise
  506.         advices and betasites:
  507.  
  508.         Martin Winkler, Uwe Engelmann, Stefan Rieck, Torsten Harling, Kalle
  509.         Braun, Ralf Pradella, Lars Bergengruen, Bjoern Schoof, Alexander
  510.         Bell, Mario Gongolsky, Yousuf Khan, vg@sai1.stollmann.de (Volkmar
  511.         Grote), harald.feldmann@almac.co.uk (Harald Feldmann) and all
  512.         people, which I forgot to mention.
  513.  
  514.         Beta testing was performed at the following sites:
  515.  
  516.            - The Ultimate Collection
  517.            - Freak Out
  518.            - The most down point in Germany
  519.            - Dr. Clone's human experimental lab (hit by a 'HOLD MAIL' spell)
  520.            - Anthem
  521.            - comma GmbH, Bonn/FRG
  522.  
  523.  
  524.         The latest non-beta versions of this program may be obtained using a
  525.         file request with magic 'IAPX' at 2:2453/30 @ fidonet.
  526.  
  527.  
  528.  
  529. ======  6 - End of file  =====================================================
  530.  
  531.         Thanx for using iAPX and for reading this. Please distribute and
  532.         share it with others!
  533.  
  534.         /chris/
  535.